
import { observable, action } from 'mobx';
import { logManage } from '../fetch/apisetting';


class LogManage {
    @observable inProgress = false;
    @observable tableData = [];
    @observable pagination={
        defaultCurrent:1,
        defaultPageSize:1,
        current:1,
        total:0
    }
    @observable param={
        "login_name":JSON.parse(localStorage.getItem('userData'))?JSON.parse(localStorage.getItem('userData')).login_name:null,
        "pagesize":"1",
        "pagenow":"1",
        "action_type":"0"
    }
    @action getTransData(){
        this.inProgress=true
        return logManage.getTransData(this.param).then(
            action('getTransData',res=>{
                window.success(res.errormsg)
                this.inProgress = false
                this.pagination.total=res.data.totalCount
                this.tableData = res.data.list
        })
        )
    }
}

export default new LogManage();
